import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();

        Solution solution = new Solution();
        System.out.println(solution.compareVersion(s1, s2));
    }
}

class Solution {
    public int compareVersion(String version1, String version2) {
        StringBuffer s1 = new StringBuffer();
        StringBuffer s2 = new StringBuffer();

        version1.split(".");

        for (int i = 0; i < version1.length(); i++) {
            if(version1.indexOf(i) == '0' || version1.indexOf(i) == '.'){
                s1.append(version1.indexOf(i));
            }
        }

        for (int i = 0; i < version2.length(); i++) {
            if(version2.indexOf(i) == '0' || version2.indexOf(i) == '.'){
                s2.append(version1.indexOf(i));
            }
        }

        return 123;
    }
}